package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.KsLetter;
import com.ruoyi.system.mapper.KsLetterMapper;
import com.ruoyi.system.service.IKsLetterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客诉工单站内信Service业务层处理
 *
 * @author hjf
 * @date 2025-07-29
 */
@Service
public class KsLetterServiceImpl implements IKsLetterService {
    @Autowired
    private KsLetterMapper ksLetterMapper;

    /**
     * 查询客诉工单站内信
     *
     * @param id 客诉工单站内信主键
     * @return 客诉工单站内信
     */
    @Override
    public KsLetter selectKsLetterById(Long id) {
        return ksLetterMapper.selectKsLetterById(id);
    }

    /**
     * 查询客诉工单站内信列表
     *
     * @param ksLetter 客诉工单站内信
     * @return 客诉工单站内信
     */
    @Override
    public List<KsLetter> selectKsLetterList(KsLetter ksLetter) {
        return ksLetterMapper.selectKsLetterList(ksLetter);
    }

    /**
     * 新增客诉工单站内信
     *
     * @param ksLetter 客诉工单站内信
     * @return 结果
     */
    @Override
    public int insertKsLetter(KsLetter ksLetter) {
        return ksLetterMapper.insertKsLetter(ksLetter);
    }

    /**
     * 修改客诉工单站内信
     *
     * @param ksLetter 客诉工单站内信
     * @return 结果
     */
    @Override
    public int updateKsLetter(KsLetter ksLetter) {
        return ksLetterMapper.updateKsLetter(ksLetter);
    }

    /**
     * 批量删除客诉工单站内信
     *
     * @param ids 需要删除的客诉工单站内信主键
     * @return 结果
     */
    @Override
    public int deleteKsLetterByIds(Long[] ids) {
        return ksLetterMapper.deleteKsLetterByIds(ids);
    }

    /**
     * 删除客诉工单站内信信息
     *
     * @param id 客诉工单站内信主键
     * @return 结果
     */
    @Override
    public int deleteKsLetterById(Long id) {
        return ksLetterMapper.deleteKsLetterById(id);
    }
}
